package ultility;

import org.andengine.entity.sprite.Sprite;
import org.andengine.entity.sprite.TiledSprite;
import org.andengine.entity.text.Text;

import android.graphics.Point;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.util.Log;

import com.example.fruit.GameActivity;
import com.example.manager.ResourcesManager;

public class dataString {
	public static float[] convertStringToFloat(String[] s) {
		float[] t = new float[s.length];
		for (int i = 0; i < t.length; i++) {
			t[i] = Float.parseFloat(s[i]);
		}
		return t;
	}
	public static float[] getDelayPeriodFromResource(int delayName){
		return convertStringToFloat(ResourcesManager.getInstance().activity.getResources()
				.getStringArray(delayName));		
	}
	public static int widthX1 = 35;public static int heightX1 = 25;
	public static int widthX2 = 50;public static int heightX2 = 40;
	public static int widthX3 = 65;public static int heightX3 = 55;
	public static Point x1 = new Point(590, 10);
	public static Point x2 = new Point(620, 7);
	public static Point x3 = new Point(628, 13);
	
	public static void clearSprite(Sprite s){
		s.clearEntityModifiers(); s.clearUpdateHandlers();
		s.setVisible(false); s.detachSelf();
	}
	public static void clearSprite(TiledSprite s){
		s.clearEntityModifiers(); s.clearUpdateHandlers();
		s.setVisible(false); s.detachSelf();
	}
	public static void clearSprite(Text s) {
		s.clearEntityModifiers(); s.clearUpdateHandlers();
		s.setVisible(false); s.detachSelf();
	}
	
} 
